/*********************************************************************
 * Copyright (C) 2008 by Duncan A. Buell.  All rights reserved.
 * Interface for the DLLNode class.
 *
 * @author Duncan A. Buell
 * @version 1.00 2008-12-16
**/

public class DLLNode implements IDLLNode
{
/*********************************************************************
 * Usual comments about instance variables.
**/
    private DLLNode next;
    private DLLNode prev;
    private Record nodeData;

    public DLLNode(){
    	
    	this.nodeData=new Record();
    }
/*********************************************************************
 * Accessors and mutators.
**/
/*********************************************************************
 * Method to get the <code>nodeData</code>.
 *
 * @return the <code>nodeData</code>.
**/
  public Record getNodeData(){
	  return nodeData;
  }

/*********************************************************************
 * Method to set the <code>nodeData</code>.
 *
 * @param newData the new value for the <code>nodeData</code>.
**/
  public void setNodeData(Record newData){
	  nodeData= newData;
  }

/*********************************************************************
 * Method to get the <code>next</code> node.
 *
 * @return the next <code>DLLNode</code>.
**/
  public DLLNode getNext(){
	  return next;
  }

/*********************************************************************
 * Method to set the <code>next</code> node.
 *
 * @param newNext the new value for the next <code>DLLNode</code>.
**/
  public void setNext(DLLNode newNext){
	  next=newNext;
  }

/*********************************************************************
 * Method to get the <code>previous<code> node.
 *
 * @return the previous <code>DLLNode</code>.
**/
  public DLLNode getPrev(){
	  return prev;
  }

/*********************************************************************
 * Method to set the <code>previous<code> node.
 *
 * @param newNext the new value for the previous <code>DLLNode</code>.
**/
  public void setPrev(DLLNode newPrev){
	  prev=newPrev;
  }

/*********************************************************************
 * General methods.
**/
/*********************************************************************
 * Method to return a <code>toString</code> of the node data.
 *
 * @return the <code>String</code> value for the node's data. 
**/
  public String toString(){
	  return nodeData.toString();
	  
  }

} // public interface IDLLNode

